<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
pageContext.setAttribute("basePath",basePath);
%>
<!DOCTYPE html>
<html lang="zh-cn">
	<head>
		<meta charset="UTF-8">
		<title>登录</title>

		<link rel="stylesheet" type="text/css" href="${basePath}resources/bootstrap/css/bootstrap-responsive.css">
		<link rel="stylesheet" type="text/css" href="${basePath}resources/bootstrap/css/bootstrap.css">
		<link rel="stylesheet" type="text/css" href="${basePath}resources/css/basic.css">
		<link rel="stylesheet" type="text/css" href="${basePath}resources/css/login.css">

		<script type="text/javascript" src="${basePath}resources/js/common/base.js"></script>
		<script type="text/javascript" src="${basePath}resources/js/common/jquery-3.2.1.min.js"></script>
		<script type="text/javascript" src="${basePath}resources/bootstrap/js/bootstrap.js"></script>
		<script type="text/javascript" src="${basePath}resources/angular-1.3.0/angular.min.js"></script>
		<script type="text/javascript" src="${basePath}resources/js/login.js"></script>
	</head>
	<body ng-app="myApp" ng-controller="loginController">
		<div id="header">
			<%@ include file="common/header.jsp" %>
			<h1>登录</h1>
		</div>
		<div id="container">
			<form onsubmit="return false;" method="post" name="loginForm" >
				<p>
					<label class="label label-length" for="email">邮箱</label>
					<input type="text" name="email" ng-model="email" placeholder="邮箱" required />
					<span class="requireItem">*</span>
				</p>
				<p>
					<label class="label label-length" for="password">密码</label>
					<input type="password" name="password" ng-model="password" required />
					<span class="requireItem">*</span>
				</p>
				<p>
					<label class="label label-length" for="yzm">验证码</label>
               	    <input type="text" id="yzm" name="yzm" ng-model="yzm" placeholder="请输入验证码" />&nbsp;&nbsp;&nbsp;
               	    <img id="code" alt="验证码" ng-click="changeCode()" src="${basePath}yzm" />
               </p>
				<p>
					<input type="submit" class="btn btn-primary" name="loginBtn" id="loginBtn" value="登录" ng-click="login()" ng-disabled="loginForm.$invalid"/>
				</p>
				<p>
					<a href="<%=basePath%>forgetpassword">忘记密码,点此找回</a>
				</p>
			</form>
		</div>
		<div id="footer">
			<%@ include file="common/footer.jsp" %>
		</div>
	</body>
</html>